var menuitem = document.createElement("menuitem");
    document.getAnonymousElementByAttribute(getBrowser(),
        "anonid","tabContextMenu").insertBefore(menuitem,
        document.getElementById("context_newTab").nextSibling);
    menuitem.setAttribute("label", "\uFEFF\u590D\u5236\u6807\u9898");
    menuitem.setAttribute("accesskey", "D");
    menuitem.addEventListener("command", copytitle, false);

function copytitle() {
if (content.document.title.match(/.*? - /))
{Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper).copyString("[url=" + content.location +"]" + content.document.title.match(/.*? - /)[0].replace(/ - /,"") + "[/url]");}
else
{Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper).copyString("[url=" + content.location +"]" + content.document.title + "[/url]");}
}